<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>onblur的演示</title>
    <script>
        //静态注册
        var changeWord = function (){
            var fName = document.getElementById("fName");
          fName.value =  fName.value.toUpperCase();
        }


        //动态注册。
        window.onload=function (){
            var fName2 = document.getElementById("fName2");
            fName2.onblur = function (){
                fName2.value =  fName2.value.toUpperCase();
            }
        }
    </script>
</head>
<body>
please input one English Word:
<input type="text" id="fName" onblur="changeWord()"><br>
please input one English Word:
<input type="text" id="fName2"><br>

</body>
</html>